home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.08 Aug 88 / Forth Stuff / Objects.test < prev   
Encoding:
Text File  |  1988-06-02  |  808 b   |  41 lines  |  [TEXT/MACH]

  1. \ ------ testing words -----------------
  2. \ -- test Integer -------
  3. Integer Make.Instance XY
  4. XY Describe
  5.  
  6. \ -- test of Array10 ----
  7.  Array10 Make.Instance vec10
  8.  000 0 vec10 Store
  9.  111 1 vec10 Store
  10.  222 2 vec10 Store
  11.  cr 1 vec10 Retrieve .
  12. vec10 Describe
  13.  
  14. \ -- test of Array ----
  15. 10 4 Array Make.Instance Arr
  16. 000 0 Arr Store
  17. 111 1 Arr Store
  18. 999 9 Arr Store
  19. cr 9 Arr Retrieve .
  20. Arr Describe
  21.  
  22. \ -- test of Vector ----
  23.  10 Vector Make.Instance vec
  24.  000 0 vec Store
  25.  111 1 vec Store
  26.  222 2 vec Store
  27.  cr 2 vec Retrieve .
  28.  vec Describe
  29.  
  30. \ -- test of String ----
  31. 14 String Make.Instance hello
  32. hello Describe
  33. : hel ." This is hello" ;
  34. ' hel 4 + hello Store
  35. cr hello Print
  36.  
  37. \ -- test of Point ----
  38. Point  Make.Instance  thisPoint
  39. 111 thisPoint Xdim ! cr thisPoint Xdim @ .
  40. 222 thisPoint Ydim ! cr thisPoint Ydim @ .
  41.